package com.kk.netty.basice.demo2;

import io.netty.channel.nio.NioEventLoopGroup;

import java.util.concurrent.TimeUnit;

public class NioEventLoopTest {
    public static void main(String[] args) throws InterruptedException {
        NioEventLoopGroup nioWorkers = new NioEventLoopGroup (2);
        System.out.println ("start...");
        Thread.sleep (2000);
//        nioWorkers.execute (()->{
//            System.out.println ("running..." );
//        });
        nioWorkers.scheduleAtFixedRate (() -> {
            System.out.println ("running..."+Thread.currentThread ().getName ());
        },0, 1, TimeUnit.SECONDS);
    }
}
